Skip to content

Conversation

@jasagredo
Copy link
Contributor

@jasagredo jasagredo commented Oct 14, 2025

Description

Patch

  • Bump to resource-registry ^>= 0.2.

Non-Breaking

  • Do not open forkers unnecessarily in the Mempool when re-syncing it.

  • Committing a forker will move the handles to the registry of the LedgerDB. The
    discarded fork will be queued to be released by the garbageCollect logic.

@jasagredo
Copy link
Contributor Author

Requires IntersectMBO/io-classes-extra#9

@jasagredo jasagredo force-pushed the js/fix-resource-registry branch 3 times, most recently from 3fca3f5 to ac1b251 Compare October 23, 2025 13:27
@jasagredo jasagredo marked this pull request as ready for review October 23, 2025 13:31
@jasagredo jasagredo force-pushed the js/fix-resource-registry branch from ac1b251 to 7b4251e Compare October 23, 2025 13:42
@jasagredo
Copy link
Contributor Author

Requires an update to hackageNix flake, once that one is updated in HaskellNix

@jasagredo jasagredo self-assigned this Oct 23, 2025
@jasagredo jasagredo moved this to 👀 In review in Consensus Team Backlog Oct 23, 2025
@jasagredo
Copy link
Contributor Author

The new packages that were brought by the Hackage update:

-ImpSpec-0.1.0.0 lib
+ImpSpec-0.2.0.0 lib
-brick-2.9 lib
+brick-2.10 lib
-dependent-map-0.4.0.0 lib
+dependent-map-0.4.0.1 lib
-fs-sim-0.4.0.0 lib
+fs-sim-0.4.1.0 lib
-generic-lens-2.2.2.0 lib
+generic-lens-2.3.0.0 lib
-generic-lens-core-2.2.1.0 lib
+generic-lens-core-2.3.0.0 lib
-generic-optics-2.2.1.0 lib
+generic-optics-2.3.0.0 lib
-hedgehog-1.5 lib
+hedgehog-1.7 lib
-hspec-2.11.13 lib
+hspec-2.11.14 lib
-hspec-core-2.11.13 lib
+hspec-core-2.11.14 lib
-hspec-discover-2.11.13 lib
+hspec-discover-2.11.14 lib
-hspec-discover-2.11.13 exe:hspec-discover
+hspec-discover-2.11.14 exe:hspec-discover
-lifted-async-0.10.2.7 lib
+lifted-async-0.11.0 lib
-microlens-0.4.13.1 lib
+microlens-0.4.14.0 lib
-microlens-ghc-0.4.14.3 lib
+microlens-ghc-0.4.15.1 lib
-parallel-3.2.2.0 lib
+parallel-3.3.0.0 lib
-pretty-simple-4.1.3.0 lib
+pretty-simple-4.1.4.0 lib
-pretty-simple-4.1.3.0 exe:pretty-simple
+pretty-simple-4.1.4.0 exe:pretty-simple
-regex-tdfa-1.3.2.4 lib
+regex-tdfa-1.3.2.5 lib
-resource-registry-0.1.1.0 lib
+resource-registry-0.2.0.0 lib
-statistics-0.16.3.0 lib
+statistics-0.16.4.0 lib
-unordered-containers-0.2.20 lib
+unordered-containers-0.2.20.1 lib

@jasagredo jasagredo force-pushed the js/fix-resource-registry branch 2 times, most recently from 45d90f6 to 25b3689 Compare October 24, 2025 14:25
@jasagredo jasagredo changed the base branch from main to js/update-constraints October 24, 2025 14:26
@jasagredo jasagredo mentioned this pull request Oct 24, 2025
8 tasks
@jasagredo jasagredo force-pushed the js/update-constraints branch from caff101 to 231b05e Compare October 24, 2025 14:46
@jasagredo jasagredo force-pushed the js/fix-resource-registry branch from 25b3689 to c578556 Compare October 24, 2025 14:50
Base automatically changed from js/update-constraints to main October 24, 2025 17:24
@jasagredo jasagredo force-pushed the js/fix-resource-registry branch 2 times, most recently from c6513dd to e56aeb5 Compare October 28, 2025 12:28
Copy link
Member

@amesgen amesgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe 9384806 should be spinned off from this PR as it actually is an independent problem on main? Or at least, the commit message could be updated to indicate that this is not just about avoiding some unnecessary work, but rather important to avoid leaking forkers and hence causing deadlocks in (at least) V1?

@jasagredo
Copy link
Contributor Author

jasagredo commented Oct 29, 2025

Yeah, I am going to forward-port #1738 (which essentially it is 9384806)

Done in #1740

@jasagredo jasagredo force-pushed the js/fix-resource-registry branch from e56aeb5 to 8a10d3f Compare October 29, 2025 12:05
@jasagredo jasagredo changed the base branch from main to js/fix-mempool-dangling-forker-forward-port October 29, 2025 12:06
@jasagredo jasagredo force-pushed the js/fix-resource-registry branch from 8a10d3f to dc903ef Compare October 29, 2025 12:08
Base automatically changed from js/fix-mempool-dangling-forker-forward-port to js/bangs October 29, 2025 12:15
@jasagredo jasagredo force-pushed the js/fix-resource-registry branch from dc903ef to 63c4347 Compare October 29, 2025 12:22
Base automatically changed from js/bangs to main October 29, 2025 19:41
github-merge-queue bot pushed a commit that referenced this pull request Oct 30, 2025
A partial backport of #1714.

The forker was being opened always, and in the following situation it
will be leaked and block the V1 LedgerDB lock forever:
- 2 blocks
- which are adopted in (increasing select view order) sequence (possibly
by them being part of a slot battle and getting the losing one first)
- very fast so that the mempool tries to revalidate exactly in between
the blocks
- it opens and holds forever a forker, it loses all reference to the
forker (leaked resource)
- then a flush happens and blocks forever as the (reading) forker in the
previous step is open forever, and flushing requests a write lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

3 participants